package cn.jiyun.service.dto;

public class JsonRes<T> {
    private static final long serialVersionUID = 51517930455124316L;

    /**
     * 返回码 0成功 1失败
     */
    private Integer code;

    /**
     * 返回消息 success成功
     */
    private String message;

    /**
     * 业务数据
     */
    private T data;

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public JsonRes(Integer code, String message, T data) {
        this.code = code;
        this.message = message;
        this.data = data;
    }

    public JsonRes() {
    }

    public JsonRes(Integer code) {
        this.code = code;
    }

    public JsonRes(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
